import { FormInstance } from 'antd/es/form/hooks/useForm'
import { IYearList, IQuarterList } from '@/pages/DataFilling/type'
import { IWardOption } from './index'
import { CardList } from '@/@types'

export interface IBasicMsg {
  hospitalApplyTime: string
  quarterNow: string
}

// mock
export interface IMock {
  id: string
  value: string
}
export const Status = [
  {
    value: '未提交',
    id: 1,
  },
  {
    value: '已提交',
    id: 2,
  },
  {
    value: '已退回',
    id: 3,
  },
]

export enum STATUS {
  NO = 0,
  DONE = 1,
  SEND_BACK = 2,
}

// 卡片信息
export interface CardList {
  title: string // 标题
  fillRate: number // 填报率
  total: number // 总数
  filledin: number // 已填报
  img: string
  id: number
  trailColor: string
  strokeColor: string
  tag: string
}

// 表结构
export interface IWardList {
  wardName: string
  status: STATUS
  reportTime: string
  dataId: string
  isProceed: number // 1不能上报，0能上报
  wardId: string // 病区id
  returnReason?: string
}
// 卡片数据结构
export interface ICardList {
  committedHospitalWardAllNum: number
  committedHospitalWardNum: number
  committedHospitalWardRate: string
  committedTitle: string
  id: string
  noCommittedHospitalWardNum: number
}
export interface IList {
  hospitalWardBottomVOList: IWardList[]
  hospitalWardHeadVOList: CardList[]
}

export interface ITableParams {
  wardReportList: IWardList[]
}

// 筛选内容
export interface IFilter {
  quarter: string
  wordId: string
  wardId: string
  status: string
}

export interface IHospital {
  basicMsg?: IBasicMsg
  filterForm: FormInstance
  quarterOptions: IYearList[]
  allWard: IWardOption[]
  formChange: (changedValues: any, allValues: any) => void
  tableParams: ITableParams
  wardHeadList: CardList[]
  getListHandle: () => void
  quarterSelect: (value: any[]) => void
}
